﻿using System;


namespace FireBus.Contracts
{
	[Serializable]
	public class Extension
	{
		private readonly Object _Instance;

		private readonly ExtensionMetadata _Metadata;


		public Object Instance
		{
			get { return _Instance; }
		}

		public ExtensionMetadata Metadata
		{
			get { return _Metadata; }
		}


		public Extension(
			Object instance,
			ExtensionMetadata metadata)
		{
			if (instance == null)
			{
				throw new ArgumentNullException("instance");
			}
			if (metadata == null)
			{
				throw new ArgumentNullException("metadata");
			}
			_Instance = instance;
			_Metadata = metadata;
		}
	}
}
